import React from "react";
import { Space } from "antd";
import TheButton from "@/components/TheButton";
import _ from 'lodash'

class Header extends React.Component {
  state = {
    type: "",
  };

  btnChange = (type) => {
    this.setState({ type }, () => {
      this.props.getTime(type);
    });
  };
  render() {
    return (
      <div className="p-search-box statics-header">
        <Space size={"large"}>
          <TheButton
            type="primary"
            onClick={() => this.btnChange("yesterday")}
            ghost
          >
            昨日
          </TheButton>
          <TheButton type="primary" onClick={() => this.btnChange("day")} ghost>
            本日
          </TheButton>
        </Space>
      </div>
    );
  }
}

export default Header;
